home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Libraries
/
TurboTCP 1.0.1
/
TurboTCP.source
/
TurboTCP.const.h
< prev
next >
Wrap
Text File
|
1993-12-10
|
1KB
|
54 lines
/*
** TurboTCP.const.h
**
** TurboTCP support library
** Global constants
**
** Copyright © 1993, FrostByte Design / Eric Scouten
**
*/
#pragma once
#include <CObject.h>
#include <MacTCPCommonTypes.h>
#define maxResolverCalls 8 // maximum DNR calls open simultaneously
#define minReceiveSize 4096L // minimum TCP receive buffer
#define recReceiveSize 16384L // recommended TCP buffer size
// custom OSErr codes: start from +23000 since MacTCP starts with -23000
enum {
noTCPError = 23000, // MacTCP is not installed
noResolverErr = 23002, // MacTCP’s DNR is not available
resolverInUse = 23003, // resolver call object was already being used
resolverBusy = 23004 // MacTCP’s DNR was busy
};
// receive bypass procedure (used by CTCPStream.h)
typedef void (*RcvBypassProc) (CObject *theObject, Ptr theData, b_16 theDataSize, Boolean isUrgent);
// asynchronous queue entries
typedef enum {
asyncCall = 1,
resolverCall,
notifyStream,
disposeStream
} asyncQueueType;
typedef struct TurboTCPQElem {
struct QElem *qLink; // next item in queue
short qType; // entry type — see asyncQueueType above
CObject *qSelfLink; // link to whatever object we had
// MUST BE LAST field in object
} TurboTCPQElem;
typedef TurboTCPQElem *TurboTCPQElemPtr;